#include "stdafx.h"
#include "CRoundedRectangle.h"

CRoundedRectangle::CRoundedRectangle(void)
{
}

CRoundedRectangle::CRoundedRectangle(CPoint pBegin, CPoint pEnd, COLORREF cPen)
{
	this->m_pBegin	= pBegin;
	this->m_pEnd	= pEnd;
	m_nAngle = NUM_OF_ANGLE;
	m_pCoordinates = new CPoint[NUM_OF_ANGLE];
	this->m_cPenColor = cPen;
	m_brushColor.CreateSolidBrush(RGB(255, 255, 255));
	m_nPenStyle = PS_SOLID;
	m_nPenWidth = 2;
}

BOOL CRoundedRectangle::Draw(CDC *cDC)
{
	CPen cPen(m_nPenStyle, m_nPenWidth, m_cPenColor);
	cDC->SelectObject(&m_brushColor);
	CPen *pOldPen = cDC->SelectObject(&cPen);
	this->setCoordinate();
	cDC->Polygon(m_pCoordinates, NUM_OF_ANGLE);
	cDC->SelectObject(pOldPen);
	pOldPen->DeleteObject();
	return	FALSE;
}

void CRoundedRectangle::setCoordinate()
{
}

CRoundedRectangle::~CRoundedRectangle(void)
{
}
